package cn.czh.exception;



/**
 * 基础异常
 *
 * @author czh
 */
public class BaseException extends RuntimeException
{
    private static final long serialVersionUID = 1L;

    /**
     * 错误码
     */
    private String code;

    /**
     * 错误消息
     */
    private String defaultMessage;

    public BaseException( String code, String defaultMessage)
    {
        this.code = code;
        this.defaultMessage = defaultMessage;
    }

    public BaseException(String defaultMessage)
    {
        this( null, defaultMessage);
    }

    @Override
    public String getMessage()
    {
        String message = null;
        message = defaultMessage;
        return message;
    }

    public String getCode()
    {
        return code;
    }


    public String getDefaultMessage()
    {
        return defaultMessage;
    }
}
